package com.demo.gateway.vo.core;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import lombok.AllArgsConstructor;
import lombok.Data;
/**
 * 单数据工具类
 * @author Administrator
 * @param <T>
 *
 */
@Data
@JsonInclude(Include.NON_NULL)
@AllArgsConstructor
public class DataVO<T>  {
	private Boolean success;
	private String msg;
	private T data;
	
	public  static<T>  DataVO<T>  ok(String msg,T obj){
		return new DataVO<T>(true, msg, obj);
	}
	
	public  static<T>  DataVO<T>  fail(String msg){
		return new DataVO<T>(false, msg, null);
	}
}
